#! /usr/bin/env python
"""
Family tree of pluster exceptions;
by matching PlusterException you trap all child exceptions.
"""
class PlusterError(Exception):
    "Parent of all pluster exceptions; match this to trap all children."
    pass

class MainServerError(PlusterError):
    """ Parent of all pluster MainServer.py exceptions"""
    pass

class MainServerNoNodeError (MainServerError):
    """get_node method could not find node """
    pass

class PConfigError (PlusterError):
    """ Parent of all pconfig.py exceptions"""
    pass

class PConfigNoUser (PConfigError):
    """ no user in user section"""
    pass

class RemoteError (PlusterError):
    """ Remote Task Error"""
    pass

class RfileNoFileError(RemoteError):
    """ Rfile can not open file"""
    pass


class RrdError(PlusterError):
    "Parent of all pluster rrd.py exceptions; match this to trap all children."
    pass

class RrdNoUserError(RrdError):
    "The draw_user method could not find an RRD file for a username."
    pass

class RrdFileNotFoundError(RrdError):
    "The update method could not find an RRD file for a hostname."
    pass
